package com.nuoniu.sibanyun.controller.system;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nuoniu.sibanyun.common.BaseController;
import com.nuoniu.sibanyun.common.result.HttpResult;
import com.nuoniu.sibanyun.entity.dto.SysLogDto;
import com.nuoniu.sibanyun.service.ISysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author baiqiang
 * @since 2020-04-23
 */
@RestController
@RequestMapping("/system/log")
@Api(value="后台日志管理接口",tags={"系统管理"})
public class SysLogController extends BaseController {

    @Autowired
    private ISysLogService sysLogService;

    @ApiOperation(value = "获取操作日志列表")
    @GetMapping("/page")
    public HttpResult listData(Page page, SysLogDto params) {
        page.setSize(params.getPage().getSize());
        Page pageInfo = sysLogService.pageLogs(page, params);
        return HttpResult.ok(pageInfo);
    }

}
